import '@js/init.js'
import{subjectData} from '../utils/getData'
renderSubjectData();
async function renderSubjectData(){
    const data = await subjectData();
    const txthtml = data.map(item => {
        return  `
        
        <tr>
        <td>${item._id}</td>
        <td>${item.name}</td>
        
        <td>
            <a href="#">修改</a>
            <a href="#" class='delet'  data-id="${item._id}">删除</a>
        </td>
    </tr>
        
        
        `
     }).join('');
     // console.log(txthtml);
     $('#subjectsTb').html(txthtml);
}
